#!/usr/bin/env python
# vim:fileencoding=utf-8

from calibre.web.feeds.news import BasicNewsRecipe


class RBCUA(BasicNewsRecipe):
    title = '\u0420\u0411\u041A-\u0423\u043A\u0440\u0430\u0438\u043D\u0430'
    __author__ = 'bugmen00t'
    description = '\u0423\u043A\u0440\u0430\u0438\u043D\u0441\u043A\u043E\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0435 \u0430\u0433\u0435\u043D\u0442\u0441\u0442\u0432\u043E, \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u0438\u0437\u0438\u0440\u0443\u044E\u0449\u0435\u0435\u0441\u044F \u043D\u0430 \u0444\u0438\u043D\u0430\u043D\u0441\u043E\u0432\u044B\u0445, \u044D\u043A\u043E\u043D\u043E\u043C\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0438 \u043F\u043E\u043B\u0438\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u043D\u043E\u0432\u043E\u0441\u0442\u044F\u0445 \u0423\u043A\u0440\u0430\u0438\u043D\u044B.'  # noqa
    publisher = '\u041E\u041E\u041E \u00AB\u042E\u0431\u0438\u0442\u0438 \u041C\u0435\u0434\u0438\u0430\u00BB'
    category = 'news'
    cover_url = u'https://www.rbc.ua/static/common/imgs/logo650.jpg'
    language = 'ru'
    no_stylesheets = False
    remove_javascript = False
    auto_cleanup = False
    oldest_article = 3
    max_articles_per_feed = 20

    remove_tags_before = dict(name='article')

    remove_tags_after = dict(name='article')

    remove_tags = [
        dict(name='span', attrs={'class': 'lang-publication'}),
        dict(name='div', attrs={'class': 'share'}),
        dict(name='ins'),
        dict(name='div', attrs={'class': 'read-in-google'}),
        dict(name='div', attrs={'class': 'intext-tags'})
    ]

    feeds = [('\u0420\u0411\u041A', 'https://www.rbc.ua/static/rss/all.rus.rss.xml')]
